Optimal. Leaf size=156 \[ \frac {2 B}{3 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {B \log \left (\cot (c+d x)-\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}+\frac {B \log \left (\cot (c+d x)+\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}-\frac {B \tan ^{-1}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \tan ^{-1}\left (\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{\sqrt {2} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 156, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 10, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {21, 3474, 3476, 329, 211, 1165, 628, 1162, 617, 204} \[ \frac {2 B}{3 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {B \log \left (\cot (c+d x)-\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}+\frac {B \log \left (\cot (c+d x)+\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}-\frac {B \tan ^{-1}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \tan ^{-1}\left (\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{\sqrt {2} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 204
Rule 211
Rule 329
Rule 617
Rule 628
Rule 1162
Rule 1165
Rule 3474
Rule 3476
Rubi steps
\begin {align*} \int \frac {a B+b B \tan (c+d x)}{\cot ^{\frac {5}{2}}(c+d x) (a+b \tan (c+d x))} \, dx &=B \int \frac {1}{\cot ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 B}{3 d \cot ^{\frac {3}{2}}(c+d x)}-B \int \frac {1}{\sqrt {\cot (c+d x)}} \, dx\\ &=\frac {2 B}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {B \operatorname {Subst}\left (\int \frac {1}{\sqrt {x} \left (1+x^2\right )} \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {2 B}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {(2 B) \operatorname {Subst}\left (\int \frac {1}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}\\ &=\frac {2 B}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {B \operatorname {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}+\frac {B \operatorname {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}\\ &=\frac {2 B}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {B \operatorname {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 d}+\frac {B \operatorname {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 d}-\frac {B \operatorname {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} d}-\frac {B \operatorname {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} d}\\ &=\frac {2 B}{3 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {B \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}+\frac {B \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}+\frac {B \operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}-\frac {B \operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}\\ &=-\frac {B \tan ^{-1}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \tan ^{-1}\left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {2 B}{3 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {B \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}+\frac {B \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.05, size = 36, normalized size = 0.23 \[ \frac {2 B \, _2F_1\left (-\frac {3}{4},1;\frac {1}{4};-\cot ^2(c+d x)\right )}{3 d \cot ^{\frac {3}{2}}(c+d x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B b \tan \left (d x + c\right ) + B a}{{\left (b \tan \left (d x + c\right ) + a\right )} \cot \left (d x + c\right )^{\frac {5}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.93, size = 546, normalized size = 3.50 \[ -\frac {B \left (-1+\cos \left (d x +c \right )\right ) \left (3 i \cos \left (d x +c \right ) \sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \EllipticPi \left (\sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )-3 i \cos \left (d x +c \right ) \sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \EllipticPi \left (\sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )+3 \cos \left (d x +c \right ) \sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \EllipticPi \left (\sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )+3 \cos \left (d x +c \right ) \sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \EllipticPi \left (\sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )-2 \cos \left (d x +c \right ) \sqrt {2}+2 \sqrt {2}\right ) \cos \left (d x +c \right ) \left (1+\cos \left (d x +c \right )\right )^{2} \sqrt {2}}{6 d \sin \left (d x +c \right )^{5} \left (\frac {\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right )^{\frac {5}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.93, size = 128, normalized size = 0.82 \[ \frac {6 \, \sqrt {2} B \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + 6 \, \sqrt {2} B \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + 3 \, \sqrt {2} B \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) - 3 \, \sqrt {2} B \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) + 8 \, B \tan \left (d x + c\right )^{\frac {3}{2}}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.49, size = 65, normalized size = 0.42 \[ \frac {2\,B}{3\,d\,{\left (\frac {1}{\mathrm {tan}\left (c+d\,x\right )}\right )}^{3/2}}-\frac {{\left (-1\right )}^{1/4}\,B\,\mathrm {atan}\left ({\left (-1\right )}^{1/4}\,\sqrt {\frac {1}{\mathrm {tan}\left (c+d\,x\right )}}\right )\,1{}\mathrm {i}}{d}-\frac {{\left (-1\right )}^{1/4}\,B\,\mathrm {atanh}\left ({\left (-1\right )}^{1/4}\,\sqrt {\frac {1}{\mathrm {tan}\left (c+d\,x\right )}}\right )\,1{}\mathrm {i}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ B \int \frac {1}{\cot ^{\frac {5}{2}}{\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________